#pragma GCC optimize("Ofast", "unroll-loops")
#include<bits/stdc++.h>
using namespace std; using ll = long long;
#define For(i, j, k) for ( int i = (j) ; i <= (k) ; i++ )
#define Fol(i, j, k) for ( int i = (j) ; i >= (k) ; i-- )
constexpr int inf = numeric_limits < int >::max() >> 1;
namespace MCMF
{
	int n, s, t, g[609][609], gg[609][609], d[609], h[609], fr[609]; bool used[609];
	inline void init(int n_, int s_, int t_)
	{
		n = n_, s = s_, t = t_;
		For(i, 1, n) fill(g[i] + 1, g[i] + n + 1, 0), fill(gg[i] + 1, gg[i] + n + 1, inf);
	}
	inline void addedge(int u, int v, int w, int c) { g[u][v] = w, gg[u][v] = c, g[v][u] = 0, gg[v][u] = -c; }
	inline void spfa()
	{
		queue < int > q; fill(h + 1, h + n + 1, inf), h[s] = 0, q.push(s);
		for ( int u ; q.size() ; )
		{
			u = q.front(), q.pop(), used[u] = false;
			For(i, 1, n) if ( g[u][i] && h[i] > h[u] + gg[u][i] )
				h[i] = h[u] + gg[u][i], used[i] || ( q.push(i), used[i] = true );
		}
	}
	inline bool dij()
	{
		fill(d + 1, d + n + 1, inf), fill(used + 1, used + n + 1, false), d[s] = 0;
		for ( int mn, u, dd ; ; )
		{
			mn = inf, u = 0; For(i, 1, n) if ( !used[i] && d[i] < mn ) mn = d[u = i];
			if ( !u ) break; used[u] = true;
			For(i, 1, n) if ( g[u][i] && d[i] > ( dd = d[u] + gg[u][i] + h[u] - h[i] ) ) d[i] = dd, fr[i] = u;
		}
		return d[t] != inf;
	}
	inline int flow()
	{
		For(i, 1, n) h[i] += d[i];
		for ( int i = t ; i != s ; i = fr[i] ) g[fr[i]][i]--, g[i][fr[i]]++;
		return h[t];
	}
}
int n, m, q, u, v, w, g[309][309], ans[309];
int main()
{
	freopen("journey.in", "r", stdin), freopen("journey.out", "w", stdout);
	cin.tie(nullptr) -> sync_with_stdio(false); 
	cin >> n >> m >> q;
	For(i, 1, n) For(j, 1, n) g[i][j] = i == j ? 0 : inf;
	For(i, 1, m) cin >> u >> v >> w, g[u][v] = min(g[u][v], w);
	For(k, 1, n) For(i, 1, n) For(j, 1, n) g[i][j] = min(g[i][j], g[i][k] + g[k][j]);
	MCMF::init(n + n + 2, n + n + 1, n + n + 2);
	For(i, 1, n) MCMF::addedge(MCMF::s, i, 1, 0), MCMF::addedge(i + n, MCMF::t, 1, 0);
	For(i, 1, n) For(j, 1, n) if ( i != j && g[i][j] != inf ) MCMF::addedge(i, j + n, 1, g[i][j]);
	for ( u = 0, MCMF::spfa() ; MCMF::dij() ; u++ ) ans[u + 1] = ans[u] + MCMF::flow();
	For(_, 1, q) { cin >> v, w = inf; For(i, 0, u) w = min(w, ans[i] + ( n - i ) * v); cout << w << '\n'; }
	return 0;
}